The present invention relates to computer-based editing systems and methods. More particularly, the present invention relates to a method and system for spill correction in a composite image.
One of the advantages of computer-based digital editing systems is the ease with which a user can manipulate digital information to achieve a desired result. Such systems permit fine control of common editing and composition processes, and allow the user to view the eventual output during the editing process, and refine or tweak the edited information. An example of such a system is SOFTIMAGE|DS.
Compositing is the process of layering video xe2x80x9cclipsxe2x80x9d, and defining how and when their images overlap. A detailed description of the compositing process can be found at pp. 365-426 of the User""s Guide for SOFTIMAGE|DS, the contents of which are incorporated herein by reference. A common compositing task is the layering of a foreground image over a background image. Typically, the foreground image consists of an object, such as an actor, that is filmed in front of a blue or green screen. The foreground image is then xe2x80x9ckeyedxe2x80x9d to generate a xe2x80x9cmattexe2x80x9d, which permits, after compositing, the background image to be visible in the formerly green or blue screen areas of the foreground image. A matte can be part of the image itself, or can be derived from another image. Keying the image is the process of creating a matte from a foreground clip, and can be based on hue-lightness-saturation (HLS), red-green-blue (RGB), or luminance (YUV) color values. Typically, the system provides a xe2x80x9ckeyerxe2x80x9d interface that permits the user to access, and modify certain keying parameters.
xe2x80x9cChroma keyingxe2x80x9d is the process of generating the key matte to remove specified color components from a foreground clip, such as green or blue screen color. The key matte is a greyscale image that defines the transparency of a foreground clip when it is composited over another image. Generating the key matte computes the image""s xe2x80x9calpha channelxe2x80x9d. An alpha channel is one of four channels, or components, of information that is contained within each pixel of an image. The alpha channel specifies the transparency of each pixel, allowing portions of the foreground image to reveal or block out corresponding portions of the background image when the two images are composited. Generally, the key matte is generated by processing HLS color values for each pixel in the image.
One difficulty with chroma keying is color correction, or xe2x80x9cspillxe2x80x9d correction, in the foreground object. Spill is a reflection of the blue or green screen color on the surface of the foreground object. Spill affects the quality of the key matte, and results in partial transparency of the foreground object. Generally, spill is most prevalent at the edges of a foreground object, but can occur over the remaining surface of the object as well.
In the prior art, this problem is addressed by applying certain image processing algorithms to the foreground object to tweak its opacity. Generally, spill correction is applied to the key matte automatically by choosing a spill correction option in the keyer. However, increasing the opacity of the foreground object creates a further problem. Because portions of the foreground image have been made less transparent, a greenish (or bluish in the case of a blue screen) tinge occurs in the foreground object where spill correction has been applied. This tinge, cast or halo effect is clearly undesirable in the final composite image. While a user can modify certain spill correction parameters, such as softness and threshold, within the keyer to reduce this tingeing, the spill correction available in the prior art is rather coarse, or crude.
It is, therefore, desirable to provide a method and system that permits a user to have finer control of the spill correction process.
In a first aspect of the present invention, there is provided a method for spill correction in a compositing process, comprising the steps of:
(i) generating a spill matte containing color correction information relating to a foreground object;
(ii) adjusting at least one property of the color correction information to modify the spill matte;
(iii) displaying the modified spill matte; and
(iv) applying the adjusted color correction information to an alpha channel of a foreground image.
In a further aspect of the present invention, there is provided a method for generating a spill matte for a foreground object, comprising the steps of:
(i) examining color values for each pixel in a foreground object;
(ii) determining if a spill color value for each pixel is greater than either of its other color values; and
(iii) assigning a color correction value to each determined pixel.
In yet another aspect of the present invention, there is provided a system for keying spill in a foreground image, comprising:
a means for generating a spill matte keyed to a spill color in a foreground image, the spill matte containing color correction information;
a means for applying image processing functions to modify the spill matte;
a means for displaying the spill matte after any modification; and
a means for applying the color correction information to an alpha channel of the foreground image.